package com.htgd.gardenexpo.api;

import com.alibaba.fastjson.JSONObject;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.lang.ref.PhantomReference;

import static com.htgd.gardenexpo.utils.RestTemplateUtils.sendGetRequest;

/**
 * 综管
 * @author lihailong
 * @date
 */
@RestController
@RequestMapping("/api/zg")
@Slf4j
@Api(tags = "综管API")
public class ZongGuanController {

    @Value("${zg.park_url}")
    private String parkUrl;

    @GetMapping("/getPark")
    @ApiOperation("获取停车场情况")
    public JSONObject getPark(){
        JSONObject jsonObject = sendGetRequest(parkUrl);
        return jsonObject;
    }


}
